/**
 * @projectName: java-daily-questions
 * @package: PACKAGE_NAME
 * @className: Main
 * @author: ZM
 * @description:
 * @date: 2021/8/17 12:04
 * @version: 1.0
 */
public class Main {
    public static int k = 0;
    static Main t1 = new Main("t1");
    public static Main t2 = new Main("t2");
    public static int i = print("i");
    public static int n = 99;
    public int j = print("j");

    static {
        print("静态块");
    }

    public Main(String str) {
        System.out.println((++k) + ": " + str + " i=" + i + " n=" + n);
        ++i;
        ++n;
    }

    public static int print(String str) {
        System.out.println((++k) + ": " + str + " i=" + i + " n=" + n);
        ++n;
        return ++i;
    }

    public static void main(String[] args) {
        new Main("init");
    }
}
